<?php

include_once "../Util/DebugUtil/DebugUtil.php";

/* 实例化Memcache类的对象 */
$memcache = new Memcached();

/* 注意第6个参数值15的作用 */
$is_add = $memcache->addServer('localhost', 11211);
echo "is_add = {$is_add}\r\n";

/* 向本机的memcached服务器中添加一组数据 */
$is_set = $memcache->set('brophp', 'BroPHP超经量组框架');
echo "is_set = {$is_set}\r\n";

$cachedValue = $memcache->get("brophp");
echo "cachedValue = {$cachedValue}\r\n";